package com.yuexun.beilunpatient.ui.inspect.model.impl;


import com.yuexun.beilunpatient.base.BaseEntity;
import com.yuexun.beilunpatient.ui.inspect.api.InspectApi;
import com.yuexun.beilunpatient.ui.inspect.bean.CheckDtlRowSet;
import com.yuexun.beilunpatient.ui.inspect.bean.JtRmyyCheckDetailResult;
import com.yuexun.beilunpatient.ui.inspect.model.IInspectDetailModel;
import com.yuexun.beilunpatient.utils.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/1/29.
 */
public class InspectDetailModel implements IInspectDetailModel {

    private InspectApi api;

    public InspectApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(InspectApi.class);
        }
    }

    @Override
    public Observable<BaseEntity<JtRmyyCheckDetailResult>> inquireBlrmyyCheckDetail(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireBlrmyyCheckDetail(praise);
    }

    @Override
    public Observable<BaseEntity<CheckDtlRowSet>> inquireCheckDetail(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireCheckDetail(praise);
    }

    @Override
    public Observable<BaseEntity<String>> cIcheckInfoMobileWeb(String sessionUuidPatient, String pageSize, String pageIndex, String accessionNumber, String OrganizationID, String ExamType) {
        api = ApiInstance();
        return api.cIcheckInfoMobileWeb(sessionUuidPatient,pageSize,pageIndex,accessionNumber,OrganizationID,ExamType);
    }


}
